Click "Edit/Stop" (red) to enter normal edit mode. Use the "Add" menu to select gates (e.g., Input, AND, OR, Delay, Clock, etc.), which appear on the canvas at (50, 50). Drag gates to position them. Use "Tools > Line Tool" to connect gates by clicking one gate, then another.
Edit Mode (Values - Orange Button):
Click "Edit/Stop" again to toggle to orange (values mode). Click Inputs or Clocks to toggle their values (1 or 0), click Delays or Clocks to set their delay time (in seconds), right-click any gate to delete it, or click a collapsed group to rename it via a dialog.
Run Mode (Green Button):
Click "Run" (green) to simulate the circuit. Inputs can be clicked to toggle their values (1 or 0), Clocks toggle automatically every set delay period (if unconnected) or pass input signals, and Delays hold their current output until the delay time elapses, then pass the latest input. Outputs display the final signal (1 or 0).
Line Tool:
From "Tools > Line Tool", click one gate (start) and then another (end) to draw a connection line. Lines transmit signals from the start gate’s output to the end gate’s input during simulation.
Select Tool:
From "Tools > Select Tool", drag a rectangle to select multiple gates or groups. A blue selection box appears with buttons: "Delete" removes selected items, "Duplicate" copies them (shifted 20px right/down), "Collapse" groups them into a single block (or "Expand" to ungroup). Use Ctrl+D to duplicate or Delete key to remove selected items.
Saving and Loading:
Use "File > Save Circuit" to name and save your circuit to local storage. Use "File > Load Circuit" to open the Circuit Manager, where you can load or delete saved circuits.
Clearing the Canvas:
Click "Clear" to reset the canvas, removing all gates, connections, and groups, and returning to normal edit mode.
Gate Types:
- Input: Toggleable signal source (1 or 0).
- AND/NAND/OR/XOR/XNOR: Logic gates with 2+ inputs.
- NOT/INVERTER: Inverts a single input.
- Delay: Passes input to output after a set delay (default 0.5s), holding the current output until the delay completes.
- Clock: Toggles 0/1 every set delay (default 0.5s) if unconnected, or passes input if connected.
- Output: Displays the final signal (1 or 0).
WARNINGS:
- Duplicating grouped objects fails: If you select and duplicate gates that are part of a collapsed group, the connections and group structure won’t copy correctly, resulting in broken or missing links.
- Check connections carefully: As currently implemented, unconnected gates (e.g., inputs with no output lines or gates with no inputs) may not function in Run mode, causing unexpected null values or no signal propagation.
- Signal transmission follows connection order: Lines transmit signals in the exact order you connected them (first click to second click), so the sequence of connections affects simulation flow—ensure this matches your intended logic.
- Simulation limits: In Run mode, the simulation updates every 100ms and has a maximum of 100 iterations per cycle; complex circuits with feedback loops might not stabilize, leading to incomplete or erratic results.